package com.sang.web;


import com.sang.service.TbSkuService;
import com.sang.support.QueryPageBean;
import com.sang.support.Result;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TbSkuController {
    @DubboReference
    private TbSkuService tbSkuService;

    @PostMapping("uploadElasticSearch")
    public void uploadElasticSearch(){
        //将数据上传到elasticsearch
        tbSkuService.add();
    }

    @PostMapping("findAll")
    public Result findAll(@RequestBody QueryPageBean queryPageBean){
        System.out.println("执行了findAll方法");
        return tbSkuService.findAll(queryPageBean);
    }


}
